Macromedia Flex Article

Learning Flex Basics (Part 3) : Working with Containers


Table of Contents

  1. Introduction
  2. Building the Containers
  3. Create the Application Object
  4. Create a Data Array
  5. Add a TabNavigator Container for Global Navigation
  6. Add an HBox and Panel Containers for Main Views
  7. Add a ViewStack, LinkBar, and Panel Containers for Secondary Views
  8. Add a Form Container
  9. Add a Tile Layout Container and Populate It Using a Repeater
  10. Create a Pseudo Bar Chart Using a Repeater and VBoxes
  11. Complete Code Listing for containers.mxml
  12. Where to Go from Here

Create the Application Object

To begin any Flex application, start with an XML declaration and an Application block. The Application tag will include a namespace declaration for the MX class library: xmlns:mx="http://www.macromedia.com/2003/mxml". The mx prefix is used with all tags for this library.

  1. Create a new file and save it as containers.mxml in the flex_tutorials directory.
  2. At the beginning of the file, insert the XML declaration:

    <?xml version="1.0">
    
  3. After the XML declaration, add an Application tag with the MXML namespace:

    <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
    </mx:Application>